using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Dragoon.BreakIt.View
{
    class TileMap
    {
        const int SOURCE_TILE_SIZE = 32;

        public Texture2D Texture;

        public TileMap()
        {
        }

        public Rectangle GetBlock(int x, int y)
        {
            return GetBlock(x, y, 0);
        }

        public Rectangle GetBlock(int x, int y, int inflate)
        {
            Rectangle result = new Rectangle(x * SOURCE_TILE_SIZE+2, y * SOURCE_TILE_SIZE+2, SOURCE_TILE_SIZE-3, SOURCE_TILE_SIZE-3);
            result.Inflate(inflate, inflate);
            return result;
        }

        public int Texels(int pixels, int targetTileSize)
        {
            return (pixels * targetTileSize) / SOURCE_TILE_SIZE;
        }
    }
}
